import Cookies from 'js-cookie' // 第三方的包

const TokenKey = 'HR_SAAS_TOKEN' // 重新起了个名字
const TimeStampKey = 'HR_SAAS_TimeStamp' // 时间戳的名字

// 存储当前时间戳
export function setTimeStamp() {
  return Cookies.set(TimeStampKey, +new Date())
}

// 获取时间戳
export function getTimeStamp() {
  return Cookies.get(TimeStampKey)
}

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}
